/*****************************************************************
Copyright (c) 2011 - 2015 Qualcomm Technologies International, Ltd.

PROJECT
    source
    
FILE NAME
    source_led_handler.h

DESCRIPTION
    Updates LED indications.
    The functionality is only included if INCLUDE_LEDS is defined.
*/


#ifdef INCLUDE_LEDS


#ifndef _SOURCE_LED_HANDLER_H_
#define _SOURCE_LED_HANDLER_H_


/* application header files */
#include "source_leds.h"
#include "source_states.h"
#include "source_audio.h"



typedef enum
{
    LED_EVENT_ONE_DEVICE_CONNECTED,
    LED_EVENT_TWO_DEVICES_CONNECTED,
    LED_EVENT_PAIR_SECOND_DEVICE,
    LED_EVENT_FACTORY_RESET,
    LED_EVENT_POWER_ON,
    LED_EVENT_CHARGER_ATTACH,
    LED_EVENT_CHARGER_DETECH,
    LED_EVENT_LOW_POWER,
    LED_EVENT_BATT_LVL_0,
    LED_EVENT_BATT_LVL_1,
    LED_EVENT_BATT_LVL_2,
    LED_EVENT_BATT_LVL_3,
    LED_EVENT_CHARGING_LVL_0,
    LED_EVENT_CHARGING_LVL_1,
    LED_EVENT_CHARGING_LVL_2,
    LED_EVENT_CHARGING_LVL_3,
    LED_EVENT_CHARGING_FULL,
    LED_EVENT_BATT_LVL_0_0,
    LED_EVENT_BATT_LVL_1_1,
    LED_EVENT_BATT_LVL_2_2,
    LED_EVENT_BATT_LVL_3_3,
} LED_EVENT_T;


/***************************************************************************
Function definitions
****************************************************************************
*/


/****************************************************************************
NAME    
    leds_show_state

DESCRIPTION
    Updates the LED pattern based on the current device state.
    
*/
void leds_show_state(bool primaryDevice, SOURCE_STATE_T state);

/****************************************************************************
NAME    
    leds_show_event

DESCRIPTION
    Updates the LED pattern based on the current device event.
    
*/
void leds_show_event(LED_EVENT_T event);


void led_show_codec(bool primaryDevice, uint8_t seid);

#endif /* _SOURCE_LED_HANDLER_H_ */


#endif /* INCLUDE_LEDS */
